﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace Wutos.Domain
{
    public class StockEntity
    {
        public Int64 id { get; set; }
        public String 证券代码 { get; set; }
        public String 证券名称 { get; set; }
        public String 成交日期 { get; set; }
        public String 成交时间 { get; set; }
        public String 操作 { get; set; }
        public Int64? 成交数量 { get; set; }
        public double? 成交均价 { get; set; }
        public double? 成交金额 { get; set; }
        public double? 手续费 { get; set; }
        public double? 印花税 { get; set; }
        public double? 其他杂费 { get; set; }
        public double? 发生金额 { get; set; }

        public override bool Equals(object? obj)
        {
            if (obj is StockEntity stock)
            {
                return 证券名称 == stock.证券名称 && 证券代码 == stock.证券代码;
            }
            return false;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(证券名称, 证券代码);
        }
    }
}
